﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Windows.Forms;

namespace ComicsDownloader.Engine.Extractors
{
    public abstract class Extractor
    {
        protected WebClient Web { get; private set; }

        protected Cartoon Cartoon { get; private set; }

        protected Extractor(Cartoon cartoon)
        {
            Cartoon = cartoon;
            Web = new WebClient();
        }

        public static Extractor Create(Cartoon cartoon)
        {
            switch (cartoon.WebSite.Id)
            {
                case WebSite.Stoo:
                    return new StooExtractor(cartoon);
//                case WebSite.Daum:
//                    return new DaumExtractor(cartoon);
//                case WebSite.Naver:
//                    return new NaverExtractor(cartoon);
                default:
                    throw new NotImplementedException("Extractor.Create");
            }
        }


        public abstract List<Picture> ExtractCartoons(int pageNo);
    }
}
